package com.oceansoft.mobile.weixin.entity;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

import org.springframework.jdbc.core.RowMapper;

public class WX_User {
	private long sid;
	private int subscribe;
	private String openid;
	private String nickname;
	private int sex;
	private String city;
	private String country;
	private String province;
	private String language;
	private String headimgurl;
	private long subscribe_time;
	private String unionid;
	
	private String wx_openid;
	private Date create_time;
	private long expires;
	private String oauth_openid;

	private String st_openid;

	public static RowMapper<WX_User> getMapp() {
        return new RowMapper<WX_User>() {
            @Override
            public WX_User mapRow(ResultSet rs, int rowNum) throws SQLException {
            	WX_User obj = new WX_User();
            	obj.setNickname(rs.getString("nickname"));
            	obj.setOpenid(rs.getString("openid"));
            	obj.setHeadimgurl(rs.getString("headimgurl"));
            	obj.setSex(rs.getInt("sex"));
            	obj.setExpires(rs.getLong("expires"));
				obj.setUnionid(rs.getString("unionid"));
				obj.setSt_openid(rs.getString("st_openid"));
				obj.setSubscribe(rs.getInt("subscribe"));
                return obj;
            }
        };
    }
	
	public long getExpires() {
		return expires;
	}

	public void setExpires(long expires) {
		this.expires = expires;
	}

	public Date getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}

	public String getOauth_openid() {
		return oauth_openid;
	}

	public void setOauth_openid(String oauth_openid) {
		this.oauth_openid = oauth_openid;
	}

	public long getSid() {
		return sid;
	}
	public void setSid(long sid) {
		this.sid = sid;
	}
	
	public int getSubscribe() {
		return subscribe;
	}

	public void setSubscribe(int subscribe) {
		this.subscribe = subscribe;
	}

	public String getOpenid() {
		return openid;
	}
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	public int getSex() {
		return sex;
	}

	public void setSex(int sex) {
		this.sex = sex;
	}

	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	public String getLanguage() {
		return language;
	}
	public void setLanguage(String language) {
		this.language = language;
	}
	public String getHeadimgurl() {
		return headimgurl;
	}
	public void setHeadimgurl(String headimgurl) {
		this.headimgurl = headimgurl;
	}
	public long getSubscribe_time() {
		return subscribe_time;
	}

	public void setSubscribe_time(long subscribe_time) {
		this.subscribe_time = subscribe_time;
	}

	public String getUnionid() {
		return unionid;
	}
	public void setUnionid(String unionid) {
		this.unionid = unionid;
	}

	public String getWx_openid() {
		return wx_openid;
	}

	public void setWx_openid(String wx_openid) {
		this.wx_openid = wx_openid;
	}

	public String getSt_openid() {
		return st_openid;
	}

	public void setSt_openid(String st_openid) {
		this.st_openid = st_openid;
	}
}
